package com.jian.java;

import com.jian.java.bean.Jian;
import com.jian.java.bean.Person;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Boot02Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(Boot02Application.class, args);
        Person person = run.getBean("person", Person.class);
        Jian jian = run.getBean("jian", Jian.class);
        System.out.println(jian.person == person);//true
    }
}
